package cn.yj.core.wechat;

import cn.yj.wechat.base.WXBaseService;
import cn.yj.wechat.miniprogram.WxMiniServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 永健
 * @since 2021-04-29 22:48
 */
@Configuration
public class WechatMiniConfig {

    @Bean
    public WxMiniServiceImpl wxMiniService(MiniConfig config){
        return new WxMiniServiceImpl(new WXBaseService(new WxHttpRequest(),config));
    }

    @Bean
    public MiniConfig miniConfig(){
        return new MiniConfig();
    }
}
